
GOPATH = $(shell go env GOPATH)

NAME = service
BUILD_PATH = build/$(NAME)

.PHONY: build
build:
	@echo "building $(DIR) ......"
	@CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-w' -i -o $(BUILD_PATH) ./main.go ./plugins.go
	@echo "success!"

.PHONY: docker
docker: build
	docker build . -t /$(NAME):latest


.PHONY:run
run:
	go run main.go plugins.go